{% extends "zinnia/skeleton.html" %}
{% load zinnia_tags tagging_tags i18n %}

{% block breadcrumbs %}
  {% zinnia_breadcrumbs %}
{% endblock %}

{% block sidebar %}
<div class="search">
  <h3>{% trans "Search" %}</h3>
  <form method="get" id="searchform" action="{% url zinnia_entry_search %}">
    <p>
      <input type="text" value="{% trans "Keywords..." %}" name="pattern" id="searchbox" onfocus="this.value=''"/>
      <input type="submit" class="submitbutton" value="OK" />
      <a title="{% trans 'You can use - to exclude words or phrases, &quot;double quotes&quot; for exact phrases and the AND/OR boolean operators combined with parenthesis for complex searchs.' %}">
        <img src="{{ ZINNIA_MEDIA_URL }}img/help.png" alt="?" width="14" height="14" />
      </a>
    </p>
  </form>
</div>
<div class="categories">
  <h3>{% trans "Categories" %}</h3>
  {% get_categories %}
</div>
<div class="authors">
  <h3>{% trans "Authors" %}</h3>
  {% get_authors %}
</div>
<div class="calendar">
  <h3>{% trans "Calendar" %}</h3>
  {% get_calendar_entries %}
</div>
<div class="tags">
  <h3>{% trans "Tags" %}</h3>
  {% tag_cloud_for_model zinnia.entry as tag_cloud with steps=6 %}
  <ul>
    {% for tag in tag_cloud %}
    <li>
      <a href="{% url zinnia_tag_detail tag.name %}" title="{{ tag.count }} {% trans "entries" %}" class="tag_{{ tag.font_size }}">
	{{ tag }}
      </a>
    </li>
    {% endfor %}
  </ul>
</div>
<div class="recents">
  <h3>{% trans "Recent entries" %}</h3>
  {% get_recent_entries 5 %}
</div>
<div class="comments">
  <h3>{% trans "Recent comments" %}</h3>
  {% get_recent_comments 5 %}
</div>
<div class="linkbacks">
  <h3>{% trans "Recent linkbacks" %}</h3>
  {% get_recent_linkbacks 5 %}
</div>
<div class="randoms">
  <h3>{% trans "Random entries" %}</h3>
  {% get_random_entries 5 %}
</div>
<div class="populars">
  <h3>{% trans "Popular entries" %}</h3>
  {% get_popular_entries 5 %}
</div>
<div class="archives">
  <h3>{% trans "Archives" %}</h3>
  {% get_archives_entries_tree %}
</div>
{% if user.is_authenticated %}
<div class="tools">
  <h3>{% trans "Tools" %}</h3>
  <ul>
    {% if perms.zinnia %}
    <li>
      <a href="{% url admin:app_list "zinnia" %}" title="{% trans "Dashboard" %}">
        {% trans "Dashboard" %}
      </a>
    </li>
    {% endif %}
    {% if perms.zinnia.add_entry %}
    <li>
      <a href="{% url admin:zinnia_entry_add %}" title="{% trans "Post an entry" %}">
        {% trans "Post an entry" %}
      </a>
    </li>
    {% endif %}
    {% block admin_tools %}
    {% endblock %}
    <li>
      <a href="{% url admin:logout %}" title="{% trans "Log out" %}">
        {% trans "Log out" %}
      </a>
    </li>
  </ul>
</div>
{% endif %}
{% endblock %}
